package com.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;


//此注解会从当前包向下扫描注解，因此Main Class尽量放在根目录，比如com.spring.boot，或com.spring，这样可以保证所有包都能被扫描到  
@SpringBootApplication(scanBasePackages={"com.boot"})
@EnableAutoConfiguration
//@EnableSwagger2 
//如果把该Main Class所在包放在WebConfig.class之上，比如com.spring.boot，就不需要@Import了 
//如果是需要解析视图  需要继承SpringBootServletInitializer 类 反之 不需要
public class App //extends SpringBootServletInitializer
{
    public static void main( String[] args ){
    	SpringApplication.run(App.class, args);
    }
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//        return builder.sources(App.class);
//    }
    
}
